<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="cfn" uri="http://francetelecom.com/cfn"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@page import="org.springframework.validation.Errors"%>

<%-- Creates a form text input. Parameters are :
    - code : the label code for the input
    - path : the path for the input
    - rows : the number of rows
    - cols : the number of cols
    - focused : value must be "focused" to focus the input
    - mandatory : optional, boolean string value, 'true' if the field is mandatory.
    - password : optional, boolean string value, 'true' if the value to enter is a password.
    - usePartialValue : optional, boolean string value, 'true' if the related label info box
      must display a label notifying the user that he can use partial values.
 --%>


<c:set var="maxRows"
  value="${empty param.rows ? '10' : param.rows}"/>

<c:set var="maxCols"
  value="${empty param.cols ? '25' : param.cols}"/>


<jsp:include page="form-field-header.jsp">
	<jsp:param name="code" value="${param.code}" />
	<jsp:param name="mandatory" value="${param.mandatory}" />
	<jsp:param name="usePartialValue" value="${param.usePartialValue}" />
</jsp:include>

<%-- Displaying the form field --%>
<form:textarea cssErrorClass="error" path="${param.path}" id="${param.id}"
	rows="${maxRows}" cols="${maxCols}" cssClass="${param.focused}"
	onkeydown="${param.onkeydown}" onkeyup="${param.onkeyup}"
	maxlength="${param.maxlength}"/>

<%-- Displaying the form field error message --%>
<jsp:include page="form-field-errors.jsp">
	<jsp:param name="path" value="${param.path}" />
</jsp:include>

<jsp:include page="form-field-footer.jsp" />